<?php echo $this->Session->flash(); ?>
<?php $bloqueo = $this->Session->read('bloqueo_avaluo'); ?>
<div id="load" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>
<h1>CONSTRUCCIONES DEL PREDIO <?php if (isset($constructions[0]['Property']['codigo']))
        echo $constructions[0]['Property']['codigo'] ?></h1>

<table  id="tabla" class="tabla" >
    <thead>
        <tr>
            <th>Código Predio</th>
            <th>Nombre de la construcción</th>
            <th>Area de construcción</th>
            <th colspan="4"></th>

        </tr>
    </thead>
    <tbody>
<?php foreach ($constructions as $const): ?>
            <tr>
                <td><?php echo $const['Property']['codigo'] ?></td>
                <td><?php echo $const['Construction']['nombre'] ?></td>
                <td><?php echo $const['Construction']['area'] ?></td>
                <td><?php echo $ajax->link('Editar', array('Controller' => 'Constructions', 'action' => 'edit', $const['Construction']['id']), array('update' => 'cont_caract', 'complete' => 'mayusculas()', 'indicator' => 'load')); ?></td>
                <td><?php if ($bloqueo == "No")echo $ajax->link('Eliminar', array('controller' => 'Constructions', 'action' => 'delete', $const['Construction']['id'], $predio), array('update' => 'cont_caract', 'complete' => 'mayusculas()', 'indicator' => 'load'), '¿Desea eliminar la construcción?'); ?></td>


            </tr>
<?php endforeach; ?>
    </tbody>
</table>
<br>


<br>
<legend><?php if ($bloqueo == "No")echo $ajax->link($html->image("adicionar1.png", array('width' => '30', 'heigth' => '30', 'alt' => 'regresar', 'align' => 'center')), array('controller' => 'Constructions', "action" => "add", $predio), array('update' => 'cont_caract', 'complete' => 'mayusculas()', 'escape'=>false,'indicator' => 'load')) ?></legend>
<br>
<br>
<legend><?php echo $ajax->link($html->image("regresar.gif", array('width' => '30', 'heigth' => '30', 'alt' => 'regresar', 'align' => 'center')), array('controller' => 'PropertyAppraisals', "action" => "constructions_index"), array('escape'=>false, 'update' => 'cont_caract', 'complete' => '', 'indicator' => 'load')) ?></legend>





